<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/barcode/Bas_SnSplitRule.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/barcode/Bas_SnSplitRule.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "barcode/Bas_SnSplitRule",
        setup() {
            const table = ref({
                key: "SnSplitRuleId",
                footer: "Foots",
                cnName: "条码解析规则",
                name: "barcode/Bas_SnSplitRule",
                newTabEdit: false,
                url: "/Bas_SnSplitRule/",
                sortName: "SnSplitRuleId"
            });
            const editFormFields = ref({"RuleCode":"","RuleName":"","RuleType":"","Delimiter":"","TierNum":"","CompanyIndex":"","MaterialIndex":"","LotIndex":"","DatecodeIndex":"","QtyIndex":"","TotalLength":"","CompanyIndexFrom":"","CompanyIndexTo":"","MaterialIndexFrom":"","MaterialIndexTo":"","LotIndexFrom":"","LotIndexTo":"","DatecodeIndexFrom":"","DatecodeIndexTo":"","QtyIndexFrom":"","QtyIndexTo":"","Remarks":""});
            const editFormOptions = ref([[{"title":"规则代码","field":"RuleCode"},
                               {"title":"规则说明","field":"RuleName"}],
                              [{"dataKey":"BASE_BarcodeRuleType","data":[],"title":"类型 ","field":"RuleType","type":"select"},
                               {"title":"条码段分隔符","field":"Delimiter"}],
                              [{"title":"条码段数","field":"TierNum","type":"number"},
                               {"title":"厂商/客户代码在第几段","field":"CompanyIndex","type":"number"}],
                              [{"title":"料号在第几段","field":"MaterialIndex","type":"number"},
                               {"title":"批次码在第几段","field":"LotIndex","type":"number"}],
                              [{"title":"日期码在第几段","field":"DatecodeIndex","type":"number"},
                               {"title":"数量在第几段","field":"QtyIndex","type":"number"}],
                              [{"title":"条码长度","field":"TotalLength","type":"number"},
                               {"title":"厂商/客户代码起始","field":"CompanyIndexFrom","type":"number"}],
                              [{"title":"厂商/客户代码截至","field":"CompanyIndexTo","type":"number"},
                               {"title":"料号起始","field":"MaterialIndexFrom","type":"number"}],
                              [{"title":"料号截至","field":"MaterialIndexTo","type":"number"},
                               {"title":"批次码起始","field":"LotIndexFrom","type":"number"}],
                              [{"title":"批次码截至","field":"LotIndexTo","type":"number"},
                               {"title":"日期码起始","field":"DatecodeIndexFrom","type":"number"}],
                              [{"title":"日期码截至","field":"DatecodeIndexTo","type":"number"},
                               {"title":"数量起始","field":"QtyIndexFrom","type":"number"}],
                              [{"title":"数量截至","field":"QtyIndexTo","type":"number"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"RuleCode":"","RuleName":"","RuleType":""});
            const searchFormOptions = ref([[{"title":"规则代码","field":"RuleCode","type":"like"},{"title":"规则说明","field":"RuleName","type":"like"},{"dataKey":"BASE_BarcodeRuleType","data":[],"title":"类型 ","field":"RuleType","type":"select"}]]);
            const columns = ref([{field:"SnSplitRuleId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"RuleCode",title:"规则代码",type:"string",width:120,fixed:true,showOverflowTooltip:true,align:"left"},
                       {field:"RuleName",title:"规则说明",type:"string",width:180,fixed:true,showOverflowTooltip:true,align:"left"},
                       {field:"RuleType",title:"类型 ",type:"int",bind:{ key:"BASE_BarcodeRuleType",data:[]},width:110,fixed:true,showOverflowTooltip:true,align:"left"},
                       {field:"Delimiter",title:"条码段分隔符",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"TierNum",title:"条码段数",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CompanyIndex",title:"厂商/客户代码在第几段",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MaterialIndex",title:"料号在第几段",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"LotIndex",title:"批次码在第几段",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"DatecodeIndex",title:"日期码在第几段",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"QtyIndex",title:"数量在第几段",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"TotalLength",title:"条码长度",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CompanyIndexFrom",title:"厂商/客户代码起始",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CompanyIndexTo",title:"厂商/客户代码截至",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MaterialIndexFrom",title:"料号起始",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"MaterialIndexTo",title:"料号截至",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"LotIndexFrom",title:"批次码起始",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"LotIndexTo",title:"批次码截至",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"DatecodeIndexFrom",title:"日期码起始",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"DatecodeIndexTo",title:"日期码截至",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"QtyIndexFrom",title:"数量起始",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"QtyIndexTo",title:"数量截至",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
